import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/views/layout/Layout'
import Dashboard from '@/views/dashboard/index'
import Markdown from '@/views/components/markdown'
import Table from '@/views/example/table'


Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Layout',
            component: Layout,
            redirect: '/dashboard',
            children: [
                {path: 'dashboard', component: Dashboard, name: '控制台'}
            ]
        },
        {
            path: '/components',
            name: 'components',
            component: Layout,
            children: [
                {path: 'markdown', component: Markdown, name: 'Markdown组件'}
            ]
        },
        {
            path: '/example',
            name: 'example',
            component: Layout,
            children: [
                {path: 'table', component: Table, name:'表格实例'}
            ]
        }
    ]
})
